import { Component } from 'react';
import './Lease.less';
import Select from 'uxcore-select2';
import Columnchart from 'components/columnchart';
const Option = Select.Option;

const data = {
  xText: '数量(辆)',
  unit: '辆',
  xAxis: ['租赁点1', '租赁点2', '租赁点3', '租赁点4', '租赁点5', '租赁点6', '租赁点7', '租赁点8'],
  yAxis: [
    {
      name: '租出',
      color: '#2087EB',
      // data: [7, 12, 20, 40, 31, 21, 25, 26]
      data:[]
    }, {
      name: '归还',
      color: '#FFA525',
      // data: [21, 32, 12, 11, 17, 29, 12, 39]
      data:[]
    }
  ]
}

export default class Lease extends Component {

  constructor(props) {
    super(props);
    this.state = {
      data: data,
      area: ''
    }
  }

  static defaultProps = {

  }
  static propTypes = {

  }

  selectChange(value) {
    this.setState({ area: value })
  }

  render() {
    let { data } = this.state;
    return (
      <div className="mod-lease">
        <Select defaultValue="拱墅区" style={{ width: 90 }} dropdownClassName="kuma-select2-selected-has-icon" onChange={this.selectChange.bind(this)}>
          <Option value="拱墅区">拱墅区</Option>
          <Option value="西湖区">西湖区</Option>
          <Option value="上城区">上城区</Option>
        </Select>
        <Columnchart data={data} />
      </div>
    );
  }
}
